<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * @namespace
 */
namespace X\Controller\Front;
use \X\Controller\Front;

/**
 * A filtered Front Controller
 *
 * @author drydenmaker
 */
class Filtered extends Front
{
    /**
     * register a value in the Broker registry
     *
     * @param string $sKey
     * @param unknown_type $xValue
     */
    static public function registerValue($Key, $Value)
    {
        $Parameters = compact('Key', 'Value');

        // @todo: wrap parent with filter

        return $Result;
    }
    /**
     * return all the registed values
     *
     * @return array
     */
    static public function getRegisteredValues()
    {
        // @todo: wrap parent with filter

        return $Result;
    }
    /**
     * retrieve a value from the Broker registry
     *
     * @param string $sKey
     * @return unknown_type
     */
    static public function getRegistered($Key)
    {
        $Parameters = compact("Key");

        // @todo: wrap parent with filter

        return $Result;
    }

    /**
     * Used for internal calls to the front controller
     *
     * @param string $RelativeUrl
     * @param array $EventData
     */
    static public function callLoopback($RelativeUrl, $EventData = array())
    {
        $Parameters = compact("RelativeUrl", "EventData");

        // @todo: wrap parent with filter

        return $Result;
    }
    /**
     * get the singelton instance
     *
     * @return X_Broker
     */
    static public function getInstance()
    {
        // @todo: wrap parent with filter

        return $Result;
    }

    /**
     * handle input event
     * if no event is given, it will be obtained from the
     * static getClientParameters method
     *
     * @param Array
     * @return Response
     */
    public function respond(Event $Event = null)
    {
        $Parameters = compact("Event");

        // @todo: wrap parent with filter

        return $Result;
    }

    /**
     * Map controller path when there is a module to be loaded
     * also change the namespace if it is a module
     *
     */
    protected function _mapModulePath()
    {
        // @todo: wrap parent with filter

        return $Result;
    }

    /**
     *
     * @param string $ClassKey
     * @param string $AppNamespace
     * @return string
     */
    protected function _expandClassName($ClassKey)
    {
        $Parameters = compact("ClassKey");

        // @todo: wrap parent with filter

        return $Result;

    }

    /**
     * Create an instance of a Ruter
     *
     * @param <type> $ControllerClassName
     * @return Router\Router
     */
    protected function _getApplicationRouter($ControllerClassName)
    {
        $Parameters = compact("ControllerClassName");

        // @todo: wrap parent with filter

        return $Result;
    }

    protected function _render(Response $Response)
    {

        $Parameters = compact("Response");

        // @todo: wrap parent with filter

        return $Result;
    }

    /**
     * set a first step to map to a library controller
     *
     * @param string $StepName
     * @param string $ClassName
     * @return Front
     */
    public function addClassMap($StepName, $ClassName)
    {
        $Parameters = compact("StepName", "ClassName");

        return $this;
    }
    
    /**
     * restrict the path for loading controllers
     * @param string $Path
     * @param bool $UseIncludePath adds the path to the include path instead of restricting the path
     * @return bool truen on success
     */
    public function setControllerPath($Path, $UseIncludePath = false)
    {
        $Parameters = compact($Path, $UseIncludePath);

        // @todo: wrap with filter
        $Result = parent::setControllerPath($Path, $UseIncludePath);

        return $Result;
    }
    /**
     * returns the current event
     * @return Event
     */
    public function &getEvent()
    {
        // @todo: wrap with filter
        $Result = parent::getEvent();

        return $Result;
    }

}
?>
